const route = Object.create(null)
route.install = function(vue) {
    // 第一个字符串是 组件名，第二个是组件路径，第三个是包名(如果不指定则已1.js,2.js....n.js命名)
    vue.component('home', (resolve) => {
        require.ensure([], () => resolve(require('../views/index/adminIndex.vue')), 'home')
    });
    vue.component('demo1', (resolve) => {
        require.ensure([], () => resolve(require('../views/demo/demo1.vue')), 'demo1')
    });
    vue.component('demo2', (resolve) => {
        require.ensure([], () => resolve(require('../views/demo/demo2.vue')), 'demo2')
    });
    vue.component('demo3', (resolve) => {
        require.ensure([], () => resolve(require('../views/demo/demo3.vue')), 'demo3')
    });
    vue.component('demo4', (resolve) => {
        require.ensure([], () => resolve(require('../views/demo/demo4.vue')), 'demo4')
    })
}


export default route